//将num转化成8进制

#include <stdio.h>
#include <math.h>
int main(){
	int num = 0;
	int bit = 0;
	int sum = 0;
	int i = 0;
	printf("输入一个数字：");
	scanf("%d",&num);

	int tmp = num;
	while(tmp > 0){
		bit = tmp % 8;
		tmp /= 8;
		sum += bit * pow(10,i);
		i++;
	}

	printf("%d --- %d\n",num,sum);

	return 0;
}
